<?php

class LeftContentBox extends AbstractBox {
	protected $template = 'main/left_content.tpl';
	
	protected function setup() {
		$pageRepository = new PageRepository();
		$pageRepository->addAdditionalWhere(array('column' => 'nav_hide', 'value' => 0));
		
		$pages = $pageRepository->getByPidAndDoktype(1, array(1,3,4));
		MySmarty::assign('pages', $pages);
		
		if (isset($GLOBALS['TSFE']->rootLine[1])) {
			MySmarty::assign('actualPage', $GLOBALS['TSFE']->rootLine[1]['uid']);
			$subpages = $pageRepository->getByPid($GLOBALS['TSFE']->rootLine[1]['uid']);
			MySmarty::assign('subpages', $subpages);
			
			if (isset($GLOBALS['TSFE']->rootLine[2])) {
				MySmarty::assign('actualSubpage', $GLOBALS['TSFE']->rootLine[2]['uid']);
			}
		}
	}
}

?>